package com.dycong.common.dataStructuresAndAlgorithms;


import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;

/**
 * Created by dycong on 2016/11/21.
 */
public class TreeErgodic {
    /**
     * 迭代Tree
     * @param t
     */
    public void printTree( BinaryNode t){
        if (t!=null)
        {
            printTree(t.left);
            System.out.println(t.element);
            printTree(t.right);
        }
    }

    private int height(BinaryNode t){
        if (t==null)
            return -1;
        else
            return 1+Math.max(height(t.left),height(t.right));
    }

    public void test(){
        Map map=new HashMap();;

        List list=new LinkedList();
        list.toArray();
    }
}
